﻿//-----------------------------------------------------------------------
// <copyright file="IAccountData.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System;
using GateShift.Common.Repository.Interfaces.DataInterfaces.Base;

#endregion

namespace GateShift.Common.Repository.Interfaces.DataInterfaces
{
    /// <summary>
    /// Generic Repository Data Interface for an account
    /// </summary>
    public interface IAccountData : IIdentityData
    {
        /// <summary>
        /// Gets or sets the Username of the account
        /// </summary>
        string AccountName { get; set; }

        /// <summary>
        /// Gets or sets the password pre-encrypted form
        /// </summary>
        byte[] Password { get; set; }

        /// <summary>
        /// Gets or sets the password salt pre-encrypted form
        /// </summary>
        byte[] PasswordSalt { get; set; }

        /// <summary>
        /// Gets or sets the email address for the account
        /// </summary>
        string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether or not the account is currently locked until further notice
        /// </summary>
        bool Locked { get; set; }

        /// <summary>
        /// Gets or sets the DateTime that the account was created
        /// </summary>
        DateTime DateCreated { get; set; }

        /// <summary>
        /// Gets or sets the DateTime that the account last logged in
        /// </summary>
        DateTime? DateLastLogin { get; set; }

        /// <summary>
        /// Gets or sets the DateTime that the account was last locked
        /// </summary>
        DateTime? DateLastLocked { get; set; }

        /// <summary>
        /// Gets or sets the descriptive comment for the account
        /// </summary>
        string Comment { get; set; }

        /// <summary>
        /// Gets or sets the date the password was last changed
        /// </summary>
        DateTime? DateLastPasswordChanged { get; set; }

        /// <summary>
        /// Gets or sets a question to be used during password recovery
        /// </summary>
        string RecoveryQuestion { get; set; }

        /// <summary>
        /// Gets or sets an answer to be used during password recovery
        /// </summary>
        string RecoveryAnswer { get; set; }

        /// <summary>
        /// Gets or sets the number of failed password attempts since last successful login
        /// </summary>
        byte FailedPasswordAttemptCount { get; set; }

        /// <summary>
        /// Gets or sets a date the account is to be locked until
        /// </summary>
        DateTime? DateLockedUntil { get; set; }

        /// <summary>
        /// Gets or sets a date the account is to be banned until
        /// </summary>
        DateTime? DateLastBanned { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether or not the account is currently banned until further notice
        /// </summary>
        bool Banned { get; set; }

        /// <summary>
        /// Gets or sets a date the account is to be banned until
        /// </summary>
        DateTime? DateBannedUntil { get; set; }
    }
}